package com.student.model;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * StudentRpAssciation entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "Student_RP_Assciation", schema = "dbo", catalog = "StudentManager")
public class StudentRpAssciation implements java.io.Serializable {

	// Fields

	private Long studentRpAssciationId;
	private RpList rpList;
	private Student student;
	private Timestamp studentRpTime;

	// Constructors

	/** default constructor */
	public StudentRpAssciation() {
	}

	/** minimal constructor */
	public StudentRpAssciation(Long studentRpAssciationId) {
		this.studentRpAssciationId = studentRpAssciationId;
	}

	/** full constructor */
	public StudentRpAssciation(Long studentRpAssciationId, RpList rpList,
			Student student, Timestamp studentRpTime) {
		this.studentRpAssciationId = studentRpAssciationId;
		this.rpList = rpList;
		this.student = student;
		this.studentRpTime = studentRpTime;
	}

	// Property accessors
	@Id
	@Column(name = "Student_RP_Assciation_id", unique = true, nullable = false, precision = 18, scale = 0)
	@GeneratedValue
	public Long getStudentRpAssciationId() {
		return this.studentRpAssciationId;
	}

	public void setStudentRpAssciationId(Long studentRpAssciationId) {
		this.studentRpAssciationId = studentRpAssciationId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "RP_id")
	public RpList getRpList() {
		return this.rpList;
	}

	public void setRpList(RpList rpList) {
		this.rpList = rpList;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "Student_id")
	public Student getStudent() {
		return this.student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	@Column(name = "Student_RP_Time", length = 23)
	public Timestamp getStudentRpTime() {
		return this.studentRpTime;
	}

	public void setStudentRpTime(Timestamp studentRpTime) {
		this.studentRpTime = studentRpTime;
	}

}